<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/include/head.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript"
	src="<%=WEBPATH%>/dwr/interface/WxcldAction.js?id=<%=generate%>"></script>
<title><html:text name="sys.name" /></title>
</head>
<body>
<form id="listDataForm" method="post"
	action="<%=WEBPATH%>/crm/wxcld/index.crm">
<table  class="condition-table">
<tr>
	<td colspan="4" class="x-panel-header" align="center"><html:text name="wxcld" /><html:text name="entity.list" /></td>
</tr>
<tr>
	<td align="right">&nbsp;</td>
	<td  colspan="3">
	<input type="submit" value="<html:text name="button.query"/>">&nbsp;&nbsp;
	<input type="button" id="new" name="new" onclick="javascript:newFunction();" value="<html:text name="button.new"/>">&nbsp;&nbsp;
	<input type="button" id="delete" name="delete" onclick="javascript:deleteFunction();" value="<html:text name="button.delete"/>">&nbsp;&nbsp;
	<input type="button" id="edit" name="edit" onclick="javascript:editFunction();" value="<html:text name="button.modify"/>">&nbsp;&nbsp;
	<input type="button" id="view" name="view" onclick="javascript:viewFunction();" value="<html:text name="button.view"/>">
	</td>
</tr> 
</table>
<script type="text/javascript">
	function newFunction(){
		window.location="<%=WEBPATH%>/crm/wxcld/create.crm";
	}
	function deleteFunction(){
		if(checkSelectData()){
			var id=checkMultiSelectData();
			if(id==null||id=="0"){
				alert("<html:text name="entity.deleted.select"/>");
				return ;
			}
			if(confirm("<html:text name="entity.deleted.confirm"/>")){
				//alert(id);
				WxcldAction.dwrDelete(id,callFunction);
			}
		}else{
			alert("<html:text name="entity.deleted.select"/>");
		}
		
	}
	function callFunction(data){
		if(data=="success"){
			alert("<html:text name="entity.deleted"/>");
			_$("listDataForm").submit();
		}else{ 
			alert("<html:text name="entity.deleted.error"/>");
		}
	}
	function editFunction(){
		if(checkSelectData()){
			var id=checkBooleanSelectData();
			if(id==null){
				alert("<html:text name="entity.updated.select"/>");
				return ;
			}
			window.location="<%=WEBPATH%>/crm/wxcld/edit.crm?id="+id;
		}else{
			alert("<html:text name="entity.updated.select"/>");
		}
	}
	function viewFunction(){
		if(checkSelectData()){
			var id=checkBooleanSelectData();
			if(id==null){
				alert("<html:text name="entity.view.select"/>");
				return ;
			}
			window.location="<%=WEBPATH%>/crm/wxcld/view.crm?id="+id;
		}else{
			alert("<html:text name="entity.view.select"/>");
		} 
	}
	function imgOnclick(orderBy,asc){
		jQuery("#orderBy").val(orderBy);
		jQuery("#asc").val(asc);
		_$("listDataForm").submit();
	}
</script>

<table class="datatable"> 
		<thead>
		<tr>
			<td align="left" width="80"><input type="checkbox" id="checkList" onclick="javascript:onSelectChange(this);"><html:text
				name="entity.choose" /><html:hidden
			id="asc" name="asc" /><html:hidden
			id="orderBy" name="orderBy" /></td>
					<td align="left" <html:if test="asc"> onclick="javascript:imgOnclick('wpgdId',false);"</html:if><html:else> onclick="javascript:imgOnclick('wpgdId',true);" </html:else>><html:text name="wxcld.wpgdId" /><html:if test="orderBy=='wpgdId'">&nbsp;<img  class="sort-arrow" <html:if test="asc"> src="<%=WEBPATH%>/images/arrow_up.png"</html:if><html:else> src="<%=WEBPATH%>/images/arrow_down.png"</html:else> /> </html:if></td>
		<td align="left" <html:if test="asc"> onclick="javascript:imgOnclick('wstate',false);"</html:if><html:else> onclick="javascript:imgOnclick('wstate',true);" </html:else>><html:text name="wxcld.wstate" /><html:if test="orderBy=='wstate'">&nbsp;<img  class="sort-arrow" <html:if test="asc"> src="<%=WEBPATH%>/images/arrow_up.png"</html:if><html:else> src="<%=WEBPATH%>/images/arrow_down.png"</html:else> /> </html:if></td>
		<td align="left" <html:if test="asc"> onclick="javascript:imgOnclick('wwxState',false);"</html:if><html:else> onclick="javascript:imgOnclick('wwxState',true);" </html:else>><html:text name="wxcld.wwxState" /><html:if test="orderBy=='wwxState'">&nbsp;<img  class="sort-arrow" <html:if test="asc"> src="<%=WEBPATH%>/images/arrow_up.png"</html:if><html:else> src="<%=WEBPATH%>/images/arrow_down.png"</html:else> /> </html:if></td>
		<td align="left" <html:if test="asc"> onclick="javascript:imgOnclick('wjdDate',false);"</html:if><html:else> onclick="javascript:imgOnclick('wjdDate',true);" </html:else>><html:text name="wxcld.wjdDate" /><html:if test="orderBy=='wjdDate'">&nbsp;<img  class="sort-arrow" <html:if test="asc"> src="<%=WEBPATH%>/images/arrow_up.png"</html:if><html:else> src="<%=WEBPATH%>/images/arrow_down.png"</html:else> /> </html:if></td>
		<td align="left" <html:if test="asc"> onclick="javascript:imgOnclick('wjxDate',false);"</html:if><html:else> onclick="javascript:imgOnclick('wjxDate',true);" </html:else>><html:text name="wxcld.wjxDate" /><html:if test="orderBy=='wjxDate'">&nbsp;<img  class="sort-arrow" <html:if test="asc"> src="<%=WEBPATH%>/images/arrow_up.png"</html:if><html:else> src="<%=WEBPATH%>/images/arrow_down.png"</html:else> /> </html:if></td>
		<td align="left" <html:if test="asc"> onclick="javascript:imgOnclick('wcjr',false);"</html:if><html:else> onclick="javascript:imgOnclick('wcjr',true);" </html:else>><html:text name="wxcld.wcjr" /><html:if test="orderBy=='wcjr'">&nbsp;<img  class="sort-arrow" <html:if test="asc"> src="<%=WEBPATH%>/images/arrow_up.png"</html:if><html:else> src="<%=WEBPATH%>/images/arrow_down.png"</html:else> /> </html:if></td>
		<td align="left" <html:if test="asc"> onclick="javascript:imgOnclick('wwxr',false);"</html:if><html:else> onclick="javascript:imgOnclick('wwxr',true);" </html:else>><html:text name="wxcld.wwxr" /><html:if test="orderBy=='wwxr'">&nbsp;<img  class="sort-arrow" <html:if test="asc"> src="<%=WEBPATH%>/images/arrow_up.png"</html:if><html:else> src="<%=WEBPATH%>/images/arrow_down.png"</html:else> /> </html:if></td>
		<td align="left" <html:if test="asc"> onclick="javascript:imgOnclick('wpgr',false);"</html:if><html:else> onclick="javascript:imgOnclick('wpgr',true);" </html:else>><html:text name="wxcld.wpgr" /><html:if test="orderBy=='wpgr'">&nbsp;<img  class="sort-arrow" <html:if test="asc"> src="<%=WEBPATH%>/images/arrow_up.png"</html:if><html:else> src="<%=WEBPATH%>/images/arrow_down.png"</html:else> /> </html:if></td>
		<td align="left" <html:if test="asc"> onclick="javascript:imgOnclick('wisfy',false);"</html:if><html:else> onclick="javascript:imgOnclick('wisfy',true);" </html:else>><html:text name="wxcld.wisfy" /><html:if test="orderBy=='wisfy'">&nbsp;<img  class="sort-arrow" <html:if test="asc"> src="<%=WEBPATH%>/images/arrow_up.png"</html:if><html:else> src="<%=WEBPATH%>/images/arrow_down.png"</html:else> /> </html:if></td>
		<td align="left" <html:if test="asc"> onclick="javascript:imgOnclick('wskje',false);"</html:if><html:else> onclick="javascript:imgOnclick('wskje',true);" </html:else>><html:text name="wxcld.wskje" /><html:if test="orderBy=='wskje'">&nbsp;<img  class="sort-arrow" <html:if test="asc"> src="<%=WEBPATH%>/images/arrow_up.png"</html:if><html:else> src="<%=WEBPATH%>/images/arrow_down.png"</html:else> /> </html:if></td>
		<td align="left" <html:if test="asc"> onclick="javascript:imgOnclick('wskzh',false);"</html:if><html:else> onclick="javascript:imgOnclick('wskzh',true);" </html:else>><html:text name="wxcld.wskzh" /><html:if test="orderBy=='wskzh'">&nbsp;<img  class="sort-arrow" <html:if test="asc"> src="<%=WEBPATH%>/images/arrow_up.png"</html:if><html:else> src="<%=WEBPATH%>/images/arrow_down.png"</html:else> /> </html:if></td>
		<td align="left" <html:if test="asc"> onclick="javascript:imgOnclick('wclientName',false);"</html:if><html:else> onclick="javascript:imgOnclick('wclientName',true);" </html:else>><html:text name="wxcld.wclientName" /><html:if test="orderBy=='wclientName'">&nbsp;<img  class="sort-arrow" <html:if test="asc"> src="<%=WEBPATH%>/images/arrow_up.png"</html:if><html:else> src="<%=WEBPATH%>/images/arrow_down.png"</html:else> /> </html:if></td>
		<td align="left" <html:if test="asc"> onclick="javascript:imgOnclick('wlinkMan',false);"</html:if><html:else> onclick="javascript:imgOnclick('wlinkMan',true);" </html:else>><html:text name="wxcld.wlinkMan" /><html:if test="orderBy=='wlinkMan'">&nbsp;<img  class="sort-arrow" <html:if test="asc"> src="<%=WEBPATH%>/images/arrow_up.png"</html:if><html:else> src="<%=WEBPATH%>/images/arrow_down.png"</html:else> /> </html:if></td>
		<td align="left" <html:if test="asc"> onclick="javascript:imgOnclick('wmobile',false);"</html:if><html:else> onclick="javascript:imgOnclick('wmobile',true);" </html:else>><html:text name="wxcld.wmobile" /><html:if test="orderBy=='wmobile'">&nbsp;<img  class="sort-arrow" <html:if test="asc"> src="<%=WEBPATH%>/images/arrow_up.png"</html:if><html:else> src="<%=WEBPATH%>/images/arrow_down.png"</html:else> /> </html:if></td>
		<td align="left" <html:if test="asc"> onclick="javascript:imgOnclick('waddress',false);"</html:if><html:else> onclick="javascript:imgOnclick('waddress',true);" </html:else>><html:text name="wxcld.waddress" /><html:if test="orderBy=='waddress'">&nbsp;<img  class="sort-arrow" <html:if test="asc"> src="<%=WEBPATH%>/images/arrow_up.png"</html:if><html:else> src="<%=WEBPATH%>/images/arrow_down.png"</html:else> /> </html:if></td>
		<td align="left" <html:if test="asc"> onclick="javascript:imgOnclick('wms',false);"</html:if><html:else> onclick="javascript:imgOnclick('wms',true);" </html:else>><html:text name="wxcld.wms" /><html:if test="orderBy=='wms'">&nbsp;<img  class="sort-arrow" <html:if test="asc"> src="<%=WEBPATH%>/images/arrow_up.png"</html:if><html:else> src="<%=WEBPATH%>/images/arrow_down.png"</html:else> /> </html:if></td>

		</tr> 
		</thead>
	<html:if test="pages.result==null">
		<tbody>
			<tr>
				<td colspan="17"><html:text name="global.page.emptyMsg" /></td>
			</tr>
		</tbody>
		<script type="text/javascript">
			jQuery("#delete").hide();
			jQuery("#edit").hide();
			jQuery("#view").hide(); 
		</script>
	</html:if>
	<html:else>
		<html:iterator id="users" value="pages.result"
			status="index">
			<tbody>
				<tr <html:if test="#index.odd">class="row_odd"</html:if>
					<html:else>class="row_even"</html:else>>
					<td align="left"><input type="checkbox" id="selectCheck" name="selectCheck"
						value="<html:property value="id"/>"></input></td>
										<td align="left"><html:property value="wpgdId" /></td>
					<td align="left"><html:property value="wstate" /></td>
					<td align="left"><html:property value="wwxState" /></td>
					<td align="left"><html:property value="wjdDate" /></td>
					<td align="left"><html:property value="wjxDate" /></td>
					<td align="left"><html:property value="wcjr" /></td>
					<td align="left"><html:property value="wwxr" /></td>
					<td align="left"><html:property value="wpgr" /></td>
					<td align="left"><html:property value="wisfy" /></td>
					<td align="left"><html:property value="wskje" /></td>
					<td align="left"><html:property value="wskzh" /></td>
					<td align="left"><html:property value="wclientName" /></td>
					<td align="left"><html:property value="wlinkMan" /></td>
					<td align="left"><html:property value="wmobile" /></td>
					<td align="left"><html:property value="waddress" /></td>
					<td align="left"><html:property value="wms" /></td>

				</tr>
			</tbody>
		</html:iterator> 
		<tfoot>
		<tr>
			<td colspan="17" align="right" valign="middle">
			<script type="text/javascript"> 
				messages=new Array();
				messages[0]="<html:text name="global.page.first" />";
				messages[1]="<html:text name="global.page.prev" />";
				messages[2]="<html:text name="global.page.next" />";
				messages[3]="<html:text name="global.page.last" />";
				messages[4]="<html:text name="global.page.page" />";
				messages[5]="<html:text name="global.page.everyPage" />";
				messages[6]="<html:text name="global.page.total" />";
				messages[7]="<html:text name="global.page.record" />";
				messages[8]="<html:text name="global.page.primo" />";
				writePage(messages,"<%=WEBPATH%>","<html:property value="page"/>","<html:property value="pages.totalPages"/>","<html:property value="pageSize"/>");
			</script>
			</td>
		</tr></tfoot>
	</html:else>
</table>
</form>
</body>
</html>